import request from 'utils/request';

export const getBanner = (): Promise<
  {
    sort: number;
    img_url: string;
  }[]
> => {
  return request({
    url: '/nfcjson/banner.json',
  });
};
export const getTypes = (): Promise<
  {
    sort: number;
    name: string;
    id: string;
  }[]
> => {
  return request({
    url: '/nfcjson/class.json',
  });
};
export const getDetails = (
  data: string,
): Promise<
  {
    img_url: string;
  }[]
> => {
  return request({
    url: `/nfcjson/details_${data}.json`,
  });
};
export const getVersion = (): Promise<{
  version_num: string;
  app_url: string;
  content: string;
}> => {
  return request({
    url: `/nfcjson/version.json`,
  });
};
